<template>
  <div>
    <div id="xgplayer"></div>
  </div>
</template>

<script>
import HlsPlayer from 'xgplayer-hls';
export default {
  name: "Xgplayer",
  components: {},
  data() {
    return {
      player:null,
    };
  },
  computed: {},
  created() {},
  mounted() {
    this.play();
  },
  methods: {
    play(){
      new HlsPlayer({
        id: 'xgplayer',
        url: 'http://192.168.99.111:9087/sms/34020000002020000001/hls/34020000001180000001_34020000001180000002/34020000001180000001_34020000001180000002_live.m3u8',
        isLive: true,
        autoplay: true,
        playsinline: true,
        height: 300,
        width: 500
      });
    }
  },
};
</script>

<style scoped lang="scss">

</style>
